1 using System.Collections;
2 using
System.Collections.Generic;
3 using
UnityEngine;
4
5 public
class SideWalls : MonoBehaviour {
6
7     
void OnTriggerEnter2D(Collider2D hitInfo) {
8         
if (hitInfo.name == "Ball")
9         {
10             
string wallName = transform.name;
11             GameManager.Score (wallName);
12             hitInfo.gameObject.SendMessage (
"RestartGame", 1, SendMessageOptions.RequireReceiver);
13         }
14     }
15 }


Gõ tìm kiếm nhanh...